package com.ruoyi.planthopper.domain;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @program: class by cxf
 * @author: AbrahamBill
 * @date: 2022/7/25
 **/
//@Data
//@AllArgsConstructor
//@NoArgsConstructor
//public class InvesInfo {
//    /**
//     * 调查记录id
//     */
//    @ExcelProperty(value = "调查id",index = 0)
//    private int id;
//    /**
//     * 调查时间
//     */
//    @ExcelProperty(value = "调查时间",index = 1)
//    @ColumnWidth(16)
//    private String time;
//    /**
//     * 天气
//     */
//    @ExcelProperty(value = "天气",index = 2)
//    private String weather;
//    /**
//     * 温度
//     */
//    @ExcelProperty(value = "温度",index = 3)
//    private String temperature;
//    /**
//     * 省
//     */
//    @ExcelProperty(value = "地块-省",index = 4)
//    private String province;
//    /**
//     * 市
//     */
//    @ExcelProperty(value = "地块-市",index = 5)
//    private String city;
//    /**
//     * 区
//     */
//    @ExcelProperty(value = "地块-区",index = 6)
//    private String district;
//    /**
//     * 详细地址
//     */
//    @ExcelProperty(value = "详细地址",index = 7)
//    private String address;
//    /**
//     * 水稻品种
//     */
//    @ExcelProperty(value = "水稻品种",index = 9)
//    private String variety;
//    /**
//     * 种植期
//     */
//    @ExcelProperty(value = "种植期",index = 10)
//    private String plantingPeriod;
//    /**
//     * 生育期
//     */
//    @ExcelProperty(value = "生育期",index = 11)
//    private String developmentStage;
//    /**
//     * 地块名称
//     */
//    @ExcelProperty(value = "地块名称",index = 8)
//    private String plotName;
//    /**
//     * 飞虱种类
//     */
//    @ExcelProperty(value = "飞虱种类",index = 12)
//    private String planthopperCategory;
//    /**
//     * 调查人
//     */
//    @ExcelProperty(value = "调查人",index = 13)
//    private String investigator;
//    /**
//     * 手机号
//     */
//    @ExcelProperty(value = "手机号",index = 14)
//    private String phone;
//    /**
//     * 原图路径
//     */
//    @ExcelProperty(value = "原始图路径",index = 15)
//    private String imgPath;
//    /**
//     * 缩略图路径
//     */
//    @ExcelProperty(value = "缩略图路径",index =16)
//    private String thumPath;
//    /**
//     * 结果图路径
//     */
//    @ExcelProperty(value = "结果图路径",index = 17)
//    private String resultPath;
//    /**
//     * 识别结果记录
//     */
//    @ExcelProperty(value = "识别结果记录",index = 18)
//    private String tag;
//    /**
//     * 长翅飞虱
//     */
//    @ExcelProperty(value = "长翅飞虱",index = 19)
//    private int mAdult;
//    /**
//     * 短翅飞虱
//     */
//    @ExcelProperty(value = "短翅飞虱",index = 20)
//    private int bAdult;
//    /**
//     * 低龄若虫
//     */
//    @ExcelProperty(value = "低龄若虫",index = 21)
//    private int jNymph;
//    /**
//     * 高龄若虫
//     */
//    @ExcelProperty(value = "高龄若虫",index = 22)
//    private int sNymph;
//    /**
//     * 虫数总计
//     */
//    @ExcelProperty(value = "虫数总计",index = 23)
//    private int sum;
//    /**
//     * 插入时间（年-月-日）方便导出使用
//     */
//    @ExcelProperty(value = "时间",index = 24)
//    private String insertDate;
//
//    @ExcelIgnore
//    private String userName;
//
//    @ExcelIgnore
//    private String displayFileName;
//
//    public void initDisplayFileName(){
//        this.displayFileName = time.replace(":","").replace(" ","").replace("-","")+investigator;
//    }
//}
@Data
@AllArgsConstructor
@NoArgsConstructor
public class InvesInfo {
    /**
     * 调查记录id
     */
    @ExcelProperty(value = "调查id",index = 0)
    private int id;
    /**
     * 调查时间
     */
    @ExcelProperty(value = "调查时间",index = 1)
    @ColumnWidth(16)
    private String time;
    /**
     * 天气
     */
    @ExcelProperty(value = "天气",index = 2)
    private String weather;
    /**
     * 温度
     */
    @ExcelProperty(value = "温度",index = 3)
    private String temperature;
    /**
     * 省
     */
    @ExcelProperty(value = "地块-省",index = 4)
    private String province;
    /**
     * 市
     */
    @ExcelProperty(value = "地块-市",index = 5)
    private String city;
    /**
     * 区
     */
    @ExcelProperty(value = "地块-区",index = 6)
    private String district;
    /**
     * 详细地址
     */
    @ExcelProperty(value = "详细地址",index = 7)
    private String address;
    /**
     * 水稻品种
     */
    @ExcelProperty(value = "水稻品种",index = 9)
    private String variety;
    /**
     * 种植期
     */
    @ExcelProperty(value = "种植期",index = 10)
    private String plantingPeriod;
    /**
     * 生育期
     */
    @ExcelProperty(value = "生育期",index = 11)
    private String developmentStage;
    /**
     * 地块名称
     */
    @ExcelProperty(value = "地块名称",index = 8)
    private String plotName;
    /**
     * 飞虱种类
     */
    @ExcelProperty(value = "飞虱种类",index = 12)
    private String planthopperCategory;
    /**
     * 调查人
     */
    @ExcelProperty(value = "调查人",index = 13)
    private String investigator;
    /**
     * 手机号
     */
    @ExcelProperty(value = "手机号",index = 14)
    private String phone;
    /**
     * 原图路径
     */
    @ExcelProperty(value = "原始图路径",index = 15)
    private String imgPath;
    /**
     * 缩略图路径
     */
    @ExcelProperty(value = "缩略图路径",index =16)
    private String thumPath;
    /**
     * 结果图路径
     */
    @ExcelProperty(value = "结果图路径",index = 17)
    private String resultPath;
    /**
     * 识别结果记录
     */
    @ExcelProperty(value = "识别结果记录",index = 18)
    private String tag;

    @ExcelProperty(value = "长翅褐飞虱成虫",index = 19)
    private int mBphAdult;
    @ExcelProperty(value = "短翅褐飞虱成虫",index = 20)
    private int bBphAdult;
    @ExcelProperty(value = "高龄褐飞虱若虫",index = 21)
    private int sBphNymph;
    @ExcelProperty(value = "长翅白背飞虱成虫",index = 22)
    private int mWbphAdult;
    @ExcelProperty(value = "短翅白背飞虱成虫",index = 23)
    private int bWbphAdult;
    @ExcelProperty(value = "高龄白背飞虱若虫",index = 24)
    private int sWbphNymph;
    @ExcelProperty(value = "低龄稻飞虱若虫",index = 25)
    private int jRphNymph;
    @ExcelProperty(value = "长翅灰飞虱成虫",index = 26)
    private int mSbphAdult;
    @ExcelProperty(value = "短翅灰飞虱成虫",index = 27)
    private int bSbphAdult;
    @ExcelProperty(value = "高龄灰飞虱若虫",index = 28)
    private int sSbphNymph;
    @ExcelProperty(value = "蜘蛛",index = 29)
    private int spider;
    @ExcelProperty(value = "蝽",index = 30)
    private int miridae;
    @ExcelProperty(value = "隐翅甲",index = 31)
    private int roveBeetle;
    @ExcelProperty(value = "叶蝉成虫",index = 32)
    private int rlhAdult;
    @ExcelProperty(value = "叶蝉若虫",index = 33)
    private int rlhNymph;

    /**
     * 虫数总计
     */
    @ExcelProperty(value = "虫数总计",index = 34)
    private int sum;
    /**
     * 插入时间（年-月-日）方便导出使用
     */
    @ExcelProperty(value = "时间",index = 35)
    private String insertDate;

    @ExcelIgnore
    private String userName;

    @ExcelIgnore
    private String displayFileName;

    public void initDisplayFileName(){
        this.displayFileName = time.replace(":","").replace(" ","").replace("-","")+investigator;
    }
}